package com.verification.bean;

import javax.validation.constraints.NotNull;

import com.verification.custom.Inspector;

public class User {
	public Integer id;

	@NotNull(message="用户名不能为空")
	@Inspector(minLength = 4,maxLength = 10)
	public String userName;
	
	@NotNull(message="密码不能为空")
	public String password;
	
	@NotNull(message="用户名不能为空")
	@Inspector(reg="^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\\.([a-zA-Z0-9_-])+)+$")
	public String email;
	
	@Inspector(length = 10)
	public String tel;
	
	@Inspector(max=150,min=1)
	public Integer age;
	
	@Inspector(enumeration="0,1")
	public Integer sex;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	
}
